package com.demo2do.fms.entity.vehicle.trailer;

import org.apache.commons.lang3.StringUtils;

import com.demo2do.core.utils.Alias;

/**
 * 挂车-车辆类型（行驶证）
 *
 * @author Ark
 *
 */
@Alias("TrailerVehicleType")
public enum TrailerVehicleType {

    HEAVY_CONTAINER("重型集装箱半挂车"),
    
    HEAVY_TRANSPORT_TRAILER("重型车辆运输半挂车"),
    
    HEAVY_SPECIAL_TRAILER("重型特殊结构半挂车"),
    
    HEAVY_MIDDLE_AXIS("重型中置轴车辆运输车"),

    HEAVY_BOX_TRUCK("重型箱式货车"),
    
    COMMON_TRAILER("普通挂车"),
    
    CANISTER_TRAILER("罐式挂车"),
    
    FLAT_TRAILER("平板挂车"),
    
    SELF_STEVEDORING("自装卸挂车"),

    MEDIUM_MIDDLE_AXIS("中型中置轴车辆运输车");
    
    private String description;

    /**
     * @param description
     */
    private TrailerVehicleType(String description) {
        this.description = description;
    }

    /**
     * @param description
     * @return
     */
    public static TrailerVehicleType descriptionOf(String description) {
        for (TrailerVehicleType vehicleType : TrailerVehicleType.values()) {
            if (StringUtils.equals(vehicleType.getDescription(), description)) {
                return vehicleType;
            }
        }
        return null;
    }
    
    /**
     * @return the description
     */
    public String getDescription() {
        return description;
    }
    
}
